//用户管理模块的接口
import request from '@/utils/request'

//枚举地址
enum API {
  USER_LIST = '/user/list',
  ROLE_LIST = '/role/list',
  ROLE_ADD = '/user/role/add',
  USER_EDIT = '/user/edit',
  USER_DELETE = '/user/delete',
  USER_ADD = '/user/add'
}
// 用户列表
export const reqUserList = (params) => request.get(API.USER_LIST, { params })

// 角色列表
export const reqRoleList = () => request.get(API.ROLE_LIST)

// 用户分配角色
export const reqRoleAdd = (data) => request.post(API.ROLE_ADD, data)

// 编辑用户
export const reqUserEdit = (data) => request.post(API.USER_EDIT, data)

// 删除用户
export const reqUserDelete = (data) => request.post(API.USER_DELETE, data)

// 新增用户
export const reqUserAdd = data => request.post(API.USER_ADD, data)
